<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<html xmlns:th="http://www.thymeleaf.org">
<html xmlns="http://www.w3.org/1999/xhtml"></html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>navigation</title>
    <link rel="stylesheet" href="/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="/css/bootstrap-theme/bootstrap-theme.min.css"/>
    <link rel="stylesheet" href="/css/bootstrap-theme.min.css"/>
    <link rel="stylesheet" href="/css/community.css"/>
    <script src="/js/bootstrap.js/" type="application/javascript"></script>
    <script type="text/javascript" src="/js/bootstrap.js"></script>
</head>
<body>

<div th:fragment="nav"></div>
<nav class="navbar navbar-default">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">麻将社区</span>
            </button>
            <a class="navbar"></a>
        </div>

        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <form class="navbar-form navbar-left">
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="搜索问题">
                </div>
                <button type="submit" class="btn btn-default">搜索1111</button>
            </form>
            <ul class="nav navbar-nav navbar-right">
                <!--绑定一个登陆地址 2需要添加参数  把需要的参数输入-->
                <!--<li><a href="login.html"  target="_blank">登陆</a></li>-->
                <li th:if="${session.user!=null}">
                    <!--<a href="/puslish">发布</a>-->
                    <a href="/publish">发布</a>
                </li>
                <li>
                    <a href="https://github.com/login/oauth/authorize?client_id=1b66d0b190ce1ebb4562&redirect_uri=http://192.168.1.76:8887/callback"
                       target="_blank">登陆</a></li>
                <li class="dropdown" th:if="${session.user!=null}">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                       aria-expanded="false" >
                        <span th:text="${session.user.getName()}">测试111</span>
                        <span class="caret"></span>
                        <ul class="dropdown-menu">
                            <li><a href="/profile/questions">我的问题</a></li>
                            <li><a href="/logout">退出登陆</a></li>
                        </ul>
                    </a>

                </li>
                <li th:unless="${session.user==null}"></li>
                <a href="https://github.com/login/oauth/"></a>
            </ul>
        </div>

    </div>

</nav>
</body>
</html>